#!/bin/sh

# put "/duke/start_up.sh &" into /etc/rc.local

echo start_up.sh

cat /etc/hostname > /proc/sys/kernel/hostname 
export HOSTNAME=`cat /etc/hostname`
/etc/init.d/avahi-daemon stop
/etc/init.d/avahi-daemon start

cd "$(dirname "$0")"

export http_proxy=http://192.168.1.44:8087

./gpio_init.sh

cp wpa.conf /tmp/

wpa_supplicant -Dnl80211 -iwlan0 -c/tmp/wpa.conf &
./wpa_watch.sh &

cd web
./httpd-start.sh

echo "start_up.sh done"
